<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <span th:include="~{include::cssStyle}"></span>
</head>
<body>
      <div class="container">
          <table class="table table-bordered table-hover">
             <tr>
               <th>编号</th>
               <th>姓名</th>
               <th>生日</th>
                 <td>
                     <button class="btn btn-info" onclick="location='/student/toadd'">新增</button>
                 </td>
             </tr>
              <tr th:each="stu:${list.records}" th:object="${stu}">
                   <td th:text="*{stuid}"></td>
                   <td th:text="*{name}"></td>
                   <td th:text="*{#dates.format(birthday,'yyyy-MM-dd')}"></td>
                   <td>
                       <button th:value="*{stuid}">修改</button>
                   </td>
              </tr>
              <tr>
                  <td colspan="10" align="center">
                      <span th:text="${list.pages}"></span>
                      <span th:text="${list.total}"></span>
                      <span th:text="${list.current}"></span>
                      <a th:href="@{/student/list(offset=1)}">首页</a>
                      <a  th:if="${list.hasPrevious()}" th:href="@{/student/list(offset=${list.current} -1)}">上页</a>
                      <a  th:if="${list.hasNext()}" th:href="@{/student/list(offset=${list.current}+1)}">下页</a>
                      <a th:href="@{/student/list(offset=${list.pages})}">末页</a>
                  </td>
              </tr>
          </table>

      </div>
</body>
</html>
